Repository navigation
Conversation
grandixximo
reviewed
Dec 1, 2026
Comment on lines
+514
to
+518
| self.draw_vector([0,0,1,1]) # Z axis | ||
| glRotate(90,0,1,0) | ||
| self.draw_vector([0,1,0,1]) | ||
| self.draw_vector([1,0,0,1]) # X axis | ||
| glRotate(-90,1,0,0) | ||
| self.draw_vector([0,0,1,1]) | ||
| self.draw_vector([0,1,0,1]) # Y axis |
Contributor
There was a problem hiding this comment.
Should this save and restore the material, like Color does? As it is, the last arrow colour (now green, before this PR blue) carries over to any sibling drawn after it without a Color wrapper.
Suggested change
| self.draw_vector([0,0,1,1]) # Z axis | |
| glRotate(90,0,1,0) | |
| self.draw_vector([0,1,0,1]) | |
| self.draw_vector([1,0,0,1]) # X axis | |
| glRotate(-90,1,0,0) | |
| self.draw_vector([0,0,1,1]) | |
| self.draw_vector([0,1,0,1]) # Y axis | |
| glPushAttrib(GL_LIGHTING_BIT) | |
| self.draw_vector([0,0,1,1]) # Z axis | |
| glRotate(90,0,1,0) | |
| self.draw_vector([1,0,0,1]) # X axis | |
| glRotate(-90,1,0,0) | |
| self.draw_vector([0,1,0,1]) # Y axis | |
| glPopAttrib() |
Contributor
Author
|
Indeed. Thanks!
Should we close this PR as superseded by #4944 (comment)? |
The Z axis indicator should be blue but gets the previous color applied in the model. This is caused by glMaterialfv() being called AFTER gluCylinder() inside draw_vector(). This moves glMaterialfv() BEFORE gluCylinder() and fixes the axes colors and wraps the three draw_vector calls with glPushAttrib(GL_LIGHTING_BIT) and glPopAttrib() to avoid leaking into other primitives.
Sigma1912
force-pushed
the
vismach_fix_HalCoords_color
branch
from
December 1, 2026 16:52
349af09 to
5e7b03f
Compare
Contributor
|
Closed as superseeded by #4944 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The Z axis indicator should be blue but gets the previous color applied in the model. This is caused by glMaterialfv() being called AFTER gluCylinder() inside draw_vector().
This moves glMaterialfv() BEFORE gluCylinder() and fixes the axes colors.